package net.youdi.gateway.properties;

import lombok.Data;
import net.youdi.gateway.util.GateWayUtil;

@Data
public class AuthenticationProperties {
    private String[] permissionAll;
    //只要登录了就可以访问
    private String[] permissionForLogin;
    private String tokenName = "token";

    public boolean isPermissionForAnonymous(String url) {
        return GateWayUtil.match(url, permissionAll);
    }
    public boolean isPermissionForLogin(String url) {
        return GateWayUtil.match(url, permissionForLogin);
    }
}
